#ifndef __TApplication_H__
#define __TApplication_H__


#include <Classes.hpp>
#include <System.hpp>
#include <SysUtils.hpp>


#pragma option push -b-
enum TMessageButton {smbOK, smbCancel, smbYes, smbNo, smbAbort, smbRetry, smbIgnore};
#pragma option pop

typedef Set <TMessageButton, smbOK, smbIgnore>  TMessageButtons;

#pragma option push -b-
enum TMessageStyle {smsInformation, smsWarning, smsCritical};
#pragma option pop


class PACKAGE TApplication : public TComponent
{
    typedef TComponent inherited;
    
public:
    #pragma option push -w-inl
    /* TComponent.Create */ inline __fastcall TApplication (TComponent * AOwner);
    #pragma option pop
    
    void __fastcall Initialize ();
    
    TMessageButton __fastcall MessageBox (const WideString Text,
                                          const WideString Caption = L"",
                                          TMessageButtons Buttons = (System::Set <TMessageButton, smbOK, smbIgnore> () << TMessageButton (0)),
                                                                                  TMessageStyle Style = (TMessageStyle) (0x0),
                                                                                  TMessageButton Default = (TMessageButton) (0x0),
                                                                                  TMessageButton Escape = (TMessageButton) (0x1));
    
    void __fastcall ShowException (Sysutils::Exception * E);
    
    void __fastcall Run ();
    
    void __fastcall Terminate ();
};


extern PACKAGE TApplication * Application;


#endif /* __TApplication_H__ */
